package com.ocl.www.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ocl.www.config.TargetDataSource;
import com.ocl.www.domain.ArticleImages;
import com.ocl.www.mapper.ArticleImageMapper;

import java.util.List;

@Service
public class ArticleImageService {

	@Autowired
	private ArticleImageMapper articleImageMapper;


	public List<ArticleImages> getImagesOfArticle(ArticleImages articleImages) throws Exception{

		return articleImageMapper.getImagesOfArticle(articleImages);

	}

	public int insertArticleImage(ArticleImages arts){
		
		int c =0; 
		
		try {
			articleImageMapper.insertArticleImage(arts);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
		return c;
		
	}
	
}
